package com.wangy.mapper;


import com.wangy.bean.PagePath;
import com.wangy.bean.TrafficStatistic;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author yyzb
 * @date 2024/12/30 15:33
 */
@Mapper
public interface StatisticMySQLMapper {

    @Select("SELECT * FROM ads_traffic_stats_by_channel WHERE dt = #{dt} AND recent_days = #{recentDays} LIMIT #{limit} OFFSET #{offset}")
    List<TrafficStatistic> getTrafficStatistics(Integer offset, Integer limit, String dt, Integer recentDays);

    @Select("SELECT source, target, path_count AS value FROM ads_page_path WHERE dt = #{dt} AND recent_days = #{recentDays}")
    List<PagePath> getPagePathCount(TrafficStatistic trafficStatistic);
}
